<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <title>Hugo  &middot; sitename</title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1">


<meta name="description" content="A fast and modern static website engine" />

<meta name="keywords" content="hugo, generator, static, site, ">


<meta property="og:title" content="Hugo  &middot; sitename ">
<meta property="og:site_name" content="sitename"/>
<meta property="og:url" content="https://lvzongcheng.gitee.io/hugo/" />
<meta property="og:locale" content="en-EN">


<meta property="og:type" content="article" />
<meta property="og:description" content="A fast and modern static website engine"/>
<meta property="og:article:published_time" content="2015-08-26T15:08:27&#43;02:00" />
<meta property="og:article:modified_time" content="2015-08-26T15:08:27&#43;02:00" />

  
    
<meta property="og:article:tag" content="hugo">
    
<meta property="og:article:tag" content="generator">
    
<meta property="og:article:tag" content="static">
    
<meta property="og:article:tag" content="site">
    
  

  

<script type="application/ld+json">
  {
    "@context": "http://schema.org",
    "@type": "Article",
    "headline": "Hugo",
    "author": {
      "@type": "Person",
      "name": "LvZongCheng"
    },
    "datePublished": "2015-08-26",
    "description": "A fast and modern static website engine",
    "wordCount":  889 
  }
</script>



<link rel="canonical" href="https://lvzongcheng.gitee.io/hugo/" />

<link rel="apple-touch-icon-precomposed" sizes="144x144" href="https://lvzongcheng.gitee.io/touch-icon-144-precomposed.png">
<link href="https://lvzongcheng.gitee.io/favicon.png" rel="icon">

<meta name="generator" content="Hugo 0.60.0" />

  <!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->

<link href='https://fonts.googleapis.com/css?family=Merriweather:300%7CRaleway%7COpen+Sans' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="/css/font-awesome.min.css">
<link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" href="/css/highlight/default.css">

  
  
	<script>
	  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
	  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
	  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
	  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

	  ga('create', 'Your Google Analytics tracking code', 'auto');
	  ga('send', 'pageview');

	</script>

</head>
<body>
  <main id="main-wrapper" class="container main_wrapper has-sidebar">
    <header id="main-header" class="container main_header">
  <div class="container brand">
  <div class="container title h1-like">
  <a class="baselink" href="https://lvzongcheng.gitee.io">
  LvZongCheng

</a>

</div>

  
<div class="container topline">
  
  淡定 执著 进取 自律


</div>


</div>

  <nav class="container nav primary no-print">
  

<a class="homelink" href="https://lvzongcheng.gitee.io">home</a>


  
<a href="https://lvzongcheng.gitee.io/framework" title="Show list of Frameworks">Frameworks</a>

<a href="https://lvzongcheng.gitee.io/java" title="Show list of Java">Java</a>

<a href="https://lvzongcheng.gitee.io/linux" title="Show list of Linux">Linux</a>

<a href="https://lvzongcheng.gitee.io/redis" title="Show list of Redis">Redis</a>

<a href="https://lvzongcheng.gitee.io/sql" title="Show list of SQL">SQL</a>

<a href="https://lvzongcheng.gitee.io/Spring" title="Show list of Spring">Spring</a>

<a href="https://lvzongcheng.gitee.io/tools" title="Show list of Tools">Tools</a>

<a href="https://lvzongcheng.gitee.io/webpage" title="Show list of WebPage">WebPage</a>

<a href="https://lvzongcheng.gitee.io/information" title="Show list of information">information</a>

<a href="https://lvzongcheng.gitee.io/network" title="Show list of network">network</a>

<a href="https://lvzongcheng.gitee.io/%E5%BE%AE%E6%9C%8D%E5%8A%A1" title="Show list of 微服务">微服务</a>

<a href="https://lvzongcheng.gitee.io/%E6%80%BB%E7%BB%93" title="Show list of 总结">总结</a>

<a href="https://lvzongcheng.gitee.io/%E6%9C%BA%E5%99%A8%E8%87%AA%E5%8A%A8%E5%8C%96" title="Show list of 机器自动化">机器自动化</a>

<a href="https://lvzongcheng.gitee.io/%E6%B1%87%E7%BC%96" title="Show list of 汇编">汇编</a>

<a href="https://lvzongcheng.gitee.io/%E8%AE%B0%E4%BA%8B%E6%9C%AC" title="Show list of 记事本">记事本</a>


</nav>

<div class="container nav secondary no-print">
  
<a id="contact-link-email" class="contact_link" rel="me" aria-label="Email" href="mailto:Lyc19880405@163.com">
  <span class="fa fa-envelope-square"></span></a>



<a id="contact-link-github" class="contact_link" rel="me" aria-label="Github" href="https://github.com/enten/hugo-boilerplate">
  <span class="fa fa-github-square"></span></a>




 


















</div>


  

</header>


<article id="main-content" class="container main_content single">
  <header class="container hat">
  <h1>Hugo
</h1>

  <div class="badges">
  
<a class="badge" href="https://ci.appveyor.com/project/spf13/hugo/branch/master">
  <img title="check appveyor status" alt="appveyor status" src="https://ci.appveyor.com/api/projects/status/n2mo912b8s2505e8/branch/master?svg=true">
</a>

<a class="badge" href="https://travis-ci.org/spf13/hugo">
  <img title="check build status" alt="build status" src="https://travis-ci.org/spf13/hugo.svg?branch=master">
</a>

<a class="badge" href="https://gitter.im/spf13/hugo?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge&amp;utm_content=badge">
  <img title="Join the chat" alt="gitter" src="https://badges.gitter.im/Join%20Chat.svg">
</a>

<a class="badge" href="https://app.wercker.com/project/bykey/1a0de7d703ce3b80527f00f675e1eb32">
  <img title="check wercker status" alt="wercker status" src="https://app.wercker.com/status/1a0de7d703ce3b80527f00f675e1eb32">
</a>


</div>

  








  





<a class="ribbon git upright" href="https://github.com/spf13/hugo">
  <img
    src="https://camo.githubusercontent.com/52760788cde945287fbb584134c4cbc2bc36f904/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f77686974655f6666666666662e706e67"
    alt="Fork me on GitHub">
</a>




</header>

  <div class="container content">
  <p><img src="https://raw.githubusercontent.com/spf13/hugo/master/docs/static/img/hugo-logo.png" alt="Hugo"></p>
<p>A Fast and Flexible Static Site Generator built with love by <a href="http://spf13.com/">spf13</a> and <a href="https://github.com/spf13/hugo/graphs/contributors">friends</a> in <a href="http://golang.org/">Go</a>.</p>
<p><a href="http://gohugo.io">Website</a> |
<a href="http://discuss.gohugo.io">Forum</a> |
<a href="https://gitter.im/spf13/hugo">Chat</a> |
<a href="http://gohugo.io/overview/introduction/">Documentation</a> |
<a href="http://gohugo.io/overview/installing/">Installation Guide</a> |
<a href="http://twitter.com/spf13">Twitter</a></p>
<h2 id="overview">Overview</h2>
<p>Hugo is a static site generator written in <a href="http://golang.org/">Go</a>. It is optimized for speed, easy use and configurability. Hugo takes a directory with content and templates and renders them into a full HTML website.</p>
<p>Hugo relies on Markdown files with front matter for meta data. And you can run Hugo from any directory. This works well for shared hosts and other systems where you don’t have a privileged account.</p>
<p>Hugo renders a typical website of moderate size in a fraction of a second. A good rule of thumb is that each piece of content renders in around 1 millisecond.</p>
<p>Hugo is meant to work well for any kind of website including blogs, tumbles and docs.</p>
<h4 id="supported-architectures">Supported Architectures</h4>
<p>Currently, we provide pre-built Hugo binaries for Windows, Linux, FreeBSD, NetBSD and OS X (Darwin) for x64, i386 and ARM architectures.</p>
<p>Hugo may also be compiled from source wherever the Go compiler tool chain can run, e.g. for other operating systems including DragonFly BSD, OpenBSD, Plan 9 and Solaris.</p>
<p><strong>Complete documentation is available at <a href="http://gohugo.io/">Hugo Documentation</a>.</strong></p>
<h2 id="choose-how-to-install">Choose How to Install</h2>
<p>If you want to use Hugo as your site generator, simply install the Hugo binaries. The Hugo binaries have no external dependencies.</p>
<p>To contribute to the Hugo source code or documentation, you should fork the Hugo GitHub project and clone it to your local machine.</p>
<p>Finally, you can install the Hugo source code with <code>go</code>, build the binaries yourself, and run Hugo that way. Building the binaries is an easy task for an experienced <code>go</code> getter.</p>
<h3 id="install-hugo-as-your-site-generator-binary-install">Install Hugo as Your Site Generator (Binary Install)</h3>
<p>Use the <a href="http://gohugo.io/overview/installing/">installation instructions in the Hugo documentation</a>.</p>
<h3 id="clone-the-hugo-project-contributor">Clone the Hugo Project (Contributor)</h3>
<ol>
<li>
<p>Make sure your local environment has the following software installed:</p>
<ul>
<li><a href="http://git-scm.com/">Git</a></li>
<li><a href="http://mercurial.selenic.com/">Mercurial</a></li>
<li><a href="http://golang.org/">Go</a> 1.3+ (Go 1.4+ on Windows, see Go <a href="https://code.google.com/p/go/issues/detail?id=8090">Issue #8090</a>)</li>
</ul>
</li>
<li>
<p>Fork the <a href="https://github.com/spf13/hugo">Hugo project on GitHub</a>.</p>
</li>
<li>
<p>Clone your fork:</p>
<pre><code> git clone https://github.com/LVZONGCHENG/hugo
</code></pre>
</li>
<li>
<p>Change into the <code>hugo</code> directory:</p>
<pre><code> cd hugo
</code></pre>
</li>
<li>
<p>Install the Hugo project’s package dependencies:</p>
<pre><code> go get -u -v github.com/spf13/hugo
</code></pre>
</li>
<li>
<p>Use a symbolic link to add your locally cloned Hugo repository to your <code>$GOPATH</code>, assuming you prefer doing development work outside of <code>$GOPATH</code>:</p>
<pre><code> rm -rf &quot;$GOPATH/src/github.com/spf13/hugo&quot;
 ln -s `pwd` &quot;$GOPATH/src/github.com/spf13/hugo&quot;
</code></pre>
<p>Go expects all of your libraries to be found in<code>$GOPATH</code>.</p>
</li>
</ol>
<h3 id="build-and-install-the-binaries-from-source-advanced-install">Build and Install the Binaries from Source (Advanced Install)</h3>
<p>Add Hugo and its package dependencies to your go <code>src</code> directory.</p>
<pre><code>go get -v github.com/spf13/hugo
</code></pre>
<p>Once the <code>get</code> completes, you should find your new <code>hugo</code> (or <code>hugo.exe</code>) executable sitting inside <code>$GOPATH/bin/</code>.</p>
<p>To update Hugo’s dependencies, use <code>go get</code> with the <code>-u</code> option.</p>
<pre><code>go get -u -v github.com/spf13/hugo
</code></pre>
<h2 id="contributing-to-hugo">Contributing to Hugo</h2>
<p>We welcome contributions to Hugo of any kind including documentation, themes, organization, tutorials, blog posts, bug reports, issues, feature requests, feature implementation, pull requests, answering questions on the forum, helping to manage issues, etc. The Hugo community and maintainers are very active and helpful and the project benefits greatly from this activity.</p>
<p><a href="https://waffle.io/spf13/hugo/metrics"><img src="https://graphs.waffle.io/spf13/hugo/throughput.svg" alt="Throughput Graph"></a></p>
<p>If you have any questions about how to contribute or what to contribute please ask on the <a href="http://discuss.gohugo.io">forum</a></p>
<h2 id="code-contribution-guideline">Code Contribution Guideline</h2>
<p>We welcome your contributions. To make the process as seamless as possible, we ask for the following:</p>
<ul>
<li>Go ahead and fork the project and make your changes. We encourage pull requests to discuss code changes.</li>
<li>When you’re ready to create a pull request, be sure to:
<ul>
<li>Sign the <a href="http://discuss.gohugo.io/t/switching-to-apache-2-license/173/26">Forum Release thread</a></li>
<li>Have test cases for the new code. If you have questions about how to do it, please ask in your pull request.</li>
<li>Run <code>go fmt</code></li>
<li>Squash your commits into a single commit. <code>git rebase -i</code>. It’s okay to force update your pull request.</li>
<li>This <a href="http://chris.beams.io/posts/git-commit/">blog article</a> is a good resource for learning how to write good commit messages, the most important part being that each commit message should have a title/subject in imperative mode without trailing period: <em>&ldquo;Return error on wrong use of the Paginator&rdquo;</em>, <strong>NOT</strong> <em>&ldquo;Returning some error.&quot;</em> Also, if your commit references one or more GitHub issues, always end your commit message body with <em>See #1234</em> or <em>Fixes #1234</em>. Replace <em>1234</em> with the GitHub issue ID. The last example will close the issue when the commit is merged into <em>master</em>.</li>
<li>Make sure <code>go test ./...</code> passes, and <code>go build</code> completes. Our <a href="https://travis-ci.org/spf13/hugo">Travis CI loop</a> (Linux) and <a href="https://ci.appveyor.com/project/spf13/hugo/branch/master">AppVeyor</a> (Windows) will catch most things that are missing.</li>
</ul>
</li>
</ul>
<h3 id="building-hugo-with-your-changes">Building Hugo with Your Changes</h3>
<pre><code>cd /path/to/hugo
go build -o hugo main.go
mv hugo /usr/local/bin/
</code></pre>
<h3 id="adding-compile-information-to-hugo">Adding compile information to Hugo</h3>
<p>When Hugo is built using the above steps, the <code>version</code> sub-command will include the <code>mdate</code> of the Hugo executable, similar to the following:</p>
<pre><code>Hugo Static Site Generator v0.13-DEV buildDate: 2014-12-24T04:46:03-07:00
</code></pre>
<p>Instead, it is possible to have the <code>version</code> sub-command return information about the git commit used and time of compilation using <code>build</code> flags.</p>
<p>To do this, replace the <code>go build</code> command with the following <em>(replace <code>/path/to/hugo</code> with the actual path)</em>:</p>
<pre><code>go build -ldflags &quot;-X /path/to/hugo/hugolib.CommitHash `git rev-parse --short HEAD 2&gt;/dev/null` -X github.com/spf13/hugo/hugolib.BuildDate `date +%FT%T%z`&quot;
</code></pre>
<p>This will result in <code>hugo version</code> output that looks similar to:</p>
<pre><code>Hugo Static Site Generator v0.13-DEV-8042E77 buildDate: 2014-12-25T03:25:57-07:00
</code></pre>
<p>Alternatively, just run <code>make</code> — all the “magic” above is already in the <code>Makefile</code>.  :wink:</p>
<h3 id="running-hugo">Running Hugo</h3>
<pre><code>cd /path/to/hugo
go install github.com/spf13/hugo/hugolib
go run main.go
</code></pre>
<p><strong>Complete documentation is available at <a href="http://gohugo.io/">Hugo Documentation</a>.</strong></p>
<p><a href="https://github.com/igrigorik/ga-beacon"><img src="https://ga-beacon.appspot.com/UA-7131036-6/hugo/readme" alt="Analytics"></a>
<a href="https://bitdeli.com/free" title="Bitdeli Badge"><img src="https://d2weczhvl823v0.cloudfront.net/spf13/hugo/trend.png" alt="Bitdeli Badge"></a></p>

</div>


  
</article>
      <footer id="main-footer" class="container main_footer">
  

  <div class="container nav foot no-print">
  
<a href="https://lvzongcheng.gitee.io/license">license</a>


  <a class="toplink" href="#">back to top</a>

</div>

  <div class="container credits">
  
<div class="container footline">
  
  code with <!-- raw HTML omitted --><!-- raw HTML omitted -->


</div>


  
<div class="container copyright">
  
  (c) 2015 yourname.


</div>


</div>

</footer>

    </main>
    
<script type="text/javascript">
  (function() {
    
    
    if (window.location.hostname == "localhost")
      return;
    var dsq = document.createElement('script'); dsq.async = true; dsq.type = 'text/javascript';
    dsq.src = '//your_disqus_shortname.disqus.com/count.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  })();
</script>



<script src="/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>



    
  </body>
</html>

